<?php
//to render shopping cart total and article count in each page
require("storescripts/cart_script.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Cart</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />

</head>

<body>
<!-- Shell -->
<div class="shell">
  <!-- Header -->
  <div id="header">
    <h1 id="logo"><a href="index.php">Luvo Fashion</a></h1>
    <!-- Cart -->
    <div id="cart"> <a href="cart.php" class="cart-link">Your Shopping Cart</a>
      <div class="cl">&nbsp;</div>
      <span>Articles: <strong><?php echo $cartArticles;?></strong></span> &nbsp;<span><strong><?php echo $cartTotal;?></strong></span>
	</div>
    <!-- End Cart -->
    <!-- Navigation -->
    <div id="navigation">
      <ul>
       	<li><a href="index.php">Home</a></li>
		<li><a href="gallery.php">Gallery</a></li>
        <li><a href="about_us.php">About Us</a></li>
        <li><a href="faq.php">FAQ</a></li>
        <li><a href="contact.php">Contact</a></li>
		<li><a href="account.php">My Account</a></li>
      </ul>
    </div>
    <!-- End Navigation -->
  </div>
  <!-- End Header -->
  <!-- Main -->
  <div id="main">
   	<!-- Content -->
	<div id="content">
		<div style="margin:10px; text-align:left;">
		<br /><br />
		</div>
		<table border="1" cellpadding="6" cellspacing="0">
		  <tr align="center">
		    <td width="150" class="cartTable">Product</td>
		    <td width="300" class="cartTable">Product Description</td>
		    <td width="65" class="cartTable">Unit Price</td>
		    <td width="65" class="cartTable">Quantity</td>
		    <td width="65" class="cartTable">Total</td>
		    <td width="70" class="cartTable">Actions</td>
	      </tr>
          <?php echo $cartOutput;?>
	  </table>
	<br />
	<div align="right"><h3><?php echo $cartTotal; ?></h3></div> <br />
	<div align="center">
		<table cellspacing="10">
		<tr>
			<td><form action="cart.php?cmd=emptycart" method="post">
			<input name="emptyBtn" type="submit" value="Empty Shopping Cart" />
			</form></td>
			<td><form action="gallery.php" method="post">
			<input name="shoppingBtn" type="submit" value="Continue Shopping" />
			</form></td>
			<?php if(isset($_SESSION["cart_array"]) && count($_SESSION["cart_array"]) >= 1) { ?>
			<td><form action="checkout.php" method="post">
				<input name="checkoutBtn" type="submit" value="Check Out Items" />
			</form></td>
			<?php }?>
			
			<?php if(count($_SESSION["cart_array"]) < 1) {?>
				<td><form action="checkout.php" method="post">
					<input name="checkoutBtn" type="submit" value="Check Out Items" disabled />
				</form></td>
			<?php } ?>
		</tr>
		</table>
		<!--<a href="cart.php?cmd=emptycart">Click Here to Empty Your Shopping Cart</a><br/>-->
			
		</div>
	<!--<a href="checkout.php">Click here to checkout</a>-->
    </div>
    <!-- End Content -->
    <!-- Sidebar -->
    <div id="sidebar">
      <!-- Login/Register -->
<!-- if no user log on show below--><!-- End Login -->
      <!-- Categories -->
      <div class="box categories">
        <h2>Categories<span></span></h2>
        <div class="box-content">
          <ul>
            <li>MEN's</li>
            <li><a href='gallery.php?cat=men&subcat=clothing'>Clothes</a></li>
			<li><a href='gallery.php?cat=men&subcat=shoes'>Shoes</a></li>
            <li><a href='gallery.php?cat=men&subcat=bags'>Bags</a></li>
            <li><a href='gallery.php?cat=men&subcat=accessories'>Accessories</a></li>
            <li>WOMEN's</li>
			<li><a href='gallery.php?cat=women&subcat=clothing'>Clothes</a></li>
            <li><a href='gallery.php?cat=women&subcat=shoes'>Shoes</a></li>
            <li><a href='gallery.php?cat=women&subcat=bags'>Bags</a></li>
            <li class="last"><a href='gallery.php?cat=women&subcat=accessories'>Accessories</a></li>
          </ul>
        </div>
      </div>
      <!-- End Categories -->
    </div>
    <!-- End Sidebar -->
    <div class="cl">&nbsp;</div>
  </div>
  <!-- End Main -->
  <!-- Footer -->
  <?php include_once("template_footer.php"); ?>
  <!-- End Footer -->
</div>
<!-- End Shell -->
</body>
</html>
